export const Dep = class {
  constructor() {
    this.deps = []
    this.target = null
  }
  // 添加元素更新
  addDep(watcher) {
    this.deps.push(watcher)
  }
  // 通知更新
  notify() {
    this.deps.forEach(watcher => {
      watcher.update()
    })
  }
}